]> fbox.kageds.com Git - adventofcode.git/blob - Gareth solution Python/1.py
commit
[adventofcode.git] / Gareth solution Python / 1.py
1 numbers = []
2 rolling = []
3 while True:
4 a = input("")
5 if a == "a":
6 break
7 numbers.append(a)
8 print("Numbers are Inputed")
9 z = 0
10 while True:
11 if z == len(numbers)-2:
12 break
13 a = int(numbers[z])+int(numbers[z+1])+int(numbers[z+2])
14 rolling.append(a)
15 z = z + 1
16 inc = 0
17 x = 0
18 while True:
19 if x == len(rolling)+1:
20 break
21 if int(rolling[x]) > int(rolling[x-1]):
22 inc = inc + 1
23 x = x + 1
24 print(inc)